FileSystem ObjectFile("path"). Folder("path"). Description The FileSystem object contains methods and attributes common to both File and Folder objects. A File object corresponds to a disk file, while a Folder object matches a directory or folder. "FileSystem" is a name used to refer to both Folders and Files. These attributes and methods differ from those found under the FileSystem Class in that they cannot be applied without referring to a particular instance of a file or folder, expressed as a path to that file or folder. You can use absolute path names and relative path names. Absolute path names start with one or two slash characters. These path names describe the full path from a root directory down to a file or folder. Relative path names start from a known location, the current directory. A relative path name starts either with a directory name or with one of the special names "." and "..". The name "." refers to the current directory, and the name ".." refers to the parent directory. The slash character is used to separate path elements. Special characters are encoded in UTF-8 notation. The FileSystem objects support a common convention. A volume name may be the first part of an absolute path. The objects know where to look for the volume names on the Macintosh and Windows and they translate the volume names accordingly. A path name can also start with the tilde "~" character. This character stands for the user's home directory (on Mac). On Windows, a directory with the environment variable HOME or, failing that, the desktop is used as a home directory. The following table illustrates how the root element of a full path name is used on different file systems. In these examples, the current drive is C: on Windows and "Macintosh HD" on the Macintosh.
Thus if you have to use a script with URI notation on both Mac and Windows, try to use relative path names, or try to originate your path names from the home directory. If that is not possible, it is recommended that you work with Mac OS X aliases andn UNC names on Windows, and store files on a machine that is remote to the Windows machine on which the script is running. Attributes
Methods
|